package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 试题题目DTO
 *
 * @author: yangyongchuan
 * @create: 2020年08月21日 16:14
 */
@ApiModel(value = "试题题目DTO")
@Data
public class QuestionItemDTO implements BaseDTO {
	private static final long serialVersionUID = -8249915352958149884L;
	/**
	 * 题目ID
	 */
	@ApiModelProperty("题目ID")
	private Integer detailId;

	/**
	 * 题目类型 1-单选
	 */
	@ApiModelProperty(value = "类型 1-单选", example = "1")
	@NotNull(message = "题目类型不能为空", groups = {Edit.class})
	private Integer questionType;

	/**
	 * 题目
	 */
	@ApiModelProperty(value = "题目")
	@NotNull(message = "题目不能为空", groups = {Edit.class})
	@NotEmpty(message = "题目不能为空", groups = {Edit.class})
	private String questionTitle;

	/**
	 * 本小题分数
	 */
	@ApiModelProperty(value = "本小题分数", example = "0")
	@NotNull(message = "本小题分数不能为空", groups = {Edit.class})
	private Integer score = 0;

	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序", example = "0")
	@NotNull(message = "排序不能为空", groups = {Edit.class})
	private Integer sortOrder = 0;

	/**
	 * 题目选项列表
	 */
	@ApiModelProperty(value = "题目选项列表")
	@NotNull(message = "题目选项列表不能为空", groups = {Edit.class})
	List<QuestionChooseDTO> chooseList;
}
